@import "./action-sheet";
@import "./action-sheet.ios.vars";

// iOS Action Sheet
// --------------------------------------------------

.action-sheet-ios {
  @include text-align($action-sheet-ios-text-align);

  font-family: $action-sheet-ios-font-family;
}

.action-sheet-ios .action-sheet-wrapper {
  @include margin(constant(safe-area-inset-top), auto, constant(safe-area-inset-bottom), auto);
  @include margin(env(safe-area-inset-top), auto, env(safe-area-inset-bottom), auto);
}


// iOS Action Sheet Container
// -----------------------------------------

.action-sheet-ios .action-sheet-container {
  @include padding($action-sheet-ios-padding-top, $action-sheet-ios-padding-end, $action-sheet-ios-padding-bottom, $action-sheet-ios-padding-start);
}


// iOS Action Sheet Group
// -----------------------------------------

.action-sheet-ios .action-sheet-group {
  @include border-radius($action-sheet-ios-border-radius);
  @include margin(null, null, $action-sheet-ios-group-margin-bottom - 2, null);

  background: $action-sheet-ios-background-color;
}

.action-sheet-ios .action-sheet-group:first-child {
  @include margin($action-sheet-ios-group-margin-top, null, null, null);
}

.action-sheet-ios .action-sheet-group:last-child {
  @include margin(null, null, $action-sheet-ios-group-margin-bottom, null);
}


// iOS Translucent Action Sheet
// -----------------------------------------

.action-sheet-translucent-ios .action-sheet-group {
  background: $action-sheet-ios-translucent-background-color;

  backdrop-filter: $action-sheet-ios-translucent-filter;
}


// iOS Action Sheet Title
// -----------------------------------------

.action-sheet-ios .action-sheet-title {
  @include padding($action-sheet-ios-title-padding-top, $action-sheet-ios-title-padding-end, $action-sheet-ios-title-padding-bottom, $action-sheet-ios-title-padding-start);

  @include text-align($action-sheet-ios-text-align);

  border-bottom: $action-sheet-ios-title-border-width $action-sheet-ios-title-border-style $action-sheet-ios-title-border-color;

  font-size: $action-sheet-ios-title-font-size;
  font-weight: $action-sheet-ios-title-font-weight;
  color: $action-sheet-ios-title-color;
}

.action-sheet-ios .action-sheet-sub-title {
  @include padding($action-sheet-ios-sub-title-padding-top, $action-sheet-ios-sub-title-padding-end, $action-sheet-ios-sub-title-padding-bottom, $action-sheet-ios-sub-title-padding-start);

  font-size: $action-sheet-ios-sub-title-font-size;
}


// iOS Action Sheet Buttons
// -----------------------------------------

.action-sheet-ios .action-sheet-button {
  @include margin(0);

  @include padding($action-sheet-ios-button-padding);

  height: $action-sheet-ios-button-height;

  border-bottom: $action-sheet-ios-button-border-width $action-sheet-ios-button-border-style $action-sheet-ios-button-border-color;

  font-size: $action-sheet-ios-button-font-size;
  color: $action-sheet-ios-button-text-color;
  background: $action-sheet-ios-button-background;

  contain: strict;
}

.action-sheet-ios .action-sheet-button .action-sheet-icon {
  @include margin($action-sheet-ios-button-icon-margin-top, null, null, null);

  @include padding-horizontal(null, $action-sheet-ios-button-icon-padding-right);

  height: $action-sheet-ios-button-icon-height;

  font-size: $action-sheet-ios-button-icon-font-size;
}

.action-sheet-ios .action-sheet-button:last-child {
  border-bottom-color: transparent;
}

.action-sheet-ios .action-sheet-button.activated {
  @include margin(-$action-sheet-ios-button-border-width, null, null, null);

  border-top: $action-sheet-ios-button-border-width $action-sheet-ios-button-border-style $action-sheet-ios-button-background-activated;
  border-bottom-color: $action-sheet-ios-button-background-activated;
  background: $action-sheet-ios-button-background-activated;
}

.action-sheet-ios .action-sheet-selected {
  font-weight: bold;
  background: $action-sheet-ios-button-background-selected;
}

.action-sheet-ios .action-sheet-destructive {
  color: $action-sheet-ios-button-destructive-text-color;
}

.action-sheet-ios .action-sheet-cancel {
  font-weight: $action-sheet-ios-button-cancel-font-weight;
  background: $action-sheet-ios-button-cancel-background;
}
